package com.aiyige.page.filter.model;

public class FilterResponse {
    public static final String FORM_TYPE_ADDRESS = "address";
    public static final String FORM_TYPE_DATE = "date";
    public static final String FORM_TYPE_MULTIPLE_SELECT = "multiple_select";
    public static final String FORM_TYPE_SINGLE_SELECT = "single_select";
    public static final String STYLE_SMALL_RECT = "smallRect";
    public static final String STYLE_BIG_RECT = "bigRect";
    public static final String STYLE_ADDRESS = "address";
    public static final String STYLE_DATE = "date";

    String name;
    String label;
    String formType;
    String valueType;
    String choises;
    String style;

    public FilterResponse() {
    }

    private FilterResponse(Builder builder) {
        setName(builder.name);
        setLabel(builder.label);
        setFormType(builder.formType);
        setValueType(builder.valueType);
        setChoises(builder.choises);
        setStyle(builder.style);
    }

    public static Builder newBuilder() {
        return new Builder();
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getLabel() {
        return label;
    }

    public void setLabel(String label) {
        this.label = label;
    }

    public String getFormType() {
        return formType;
    }

    public void setFormType(String formType) {
        this.formType = formType;
    }

    public String getValueType() {
        return valueType;
    }

    public void setValueType(String valueType) {
        this.valueType = valueType;
    }

    public String getChoises() {
        return choises;
    }

    public void setChoises(String choises) {
        this.choises = choises;
    }

    public String getStyle() {
        return style;
    }

    public void setStyle(String style) {
        this.style = style;
    }

    public static class Choice {
        String id;
        String name;

        public Choice() {
        }

        public String getId() {
            return id;
        }

        public void setId(String id) {
            this.id = id;
        }

        public String getName() {
            return name;
        }

        public void setName(String name) {
            this.name = name;
        }
    }

    public static final class Builder {
        private String name;
        private String label;
        private String formType;
        private String valueType;
        private String choises;
        private String style;

        private Builder() {
        }

        public Builder name(String val) {
            name = val;
            return this;
        }

        public Builder label(String val) {
            label = val;
            return this;
        }

        public Builder formType(String val) {
            formType = val;
            return this;
        }

        public Builder valueType(String val) {
            valueType = val;
            return this;
        }

        public Builder choises(String val) {
            choises = val;
            return this;
        }

        public Builder style(String val) {
            style = val;
            return this;
        }

        public FilterResponse build() {
            return new FilterResponse(this);
        }
    }
}
